//
//  SiSaveProgressView.swift
//  SiliUtility
//
//  Created by Li Dong on 2023/10/19.
//

import UIKit
import KDCircularProgress

class SiSaveProgressView: UIView {

    var contentView: UIView!
    
    @IBOutlet weak var amountProgressView: KDCircularProgress!
    @IBOutlet weak var totalAmountLabel: UILabel!
    @IBOutlet weak var currentTotalLabel: UILabel!
    @IBOutlet weak var amountProgressLabel: UILabel!
    
    
    @IBOutlet weak var daysProgressView: KDCircularProgress!
    @IBOutlet weak var daysLabel: UILabel!
    @IBOutlet weak var daysProgressLabel: UILabel!
    @IBOutlet weak var startLabel: UILabel!
    @IBOutlet weak var endLabel: UILabel!
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        contentView = loadViewFromNib()
        contentView.frame = self.bounds
        addSubview(contentView)
        
        amountProgressView.startAngle = -90
        amountProgressView.roundedCorners = false
        amountProgressView.trackColor = UIColor.init(hex: 0x7339DD, alpha: 0.3)
        amountProgressView.progressColors = [UIColor.init(hex: 0x7339DD)]
        amountProgressView.progressInsideFillColor = .white
        amountProgressView.progress = 0.3
        amountProgressView.trackThickness = 0.3
        amountProgressView.progressThickness = 0.3
        
        daysProgressView.startAngle = -90
        daysProgressView.roundedCorners = false
        daysProgressView.trackColor = UIColor.init(hex: 0x7339DD, alpha: 0.3)
        daysProgressView.progressColors = [UIColor.init(hex: 0x7339DD)]
        daysProgressView.progressInsideFillColor = .white
        daysProgressView.progress = 0.3
        daysProgressView.trackThickness = 0.3
        daysProgressView.progressThickness = 0.3
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
